// @import "./common.less";
@import url("./common.less");

// ----------------------------body：页面整体样式
body {
    min-width: 320px;
    
    // 思路1
    // 【15rem】结合【font-size: 50px;】取得最大宽度：750px
    width: 15rem;
    // 思路2
    // 直接写 max-width: 750px; 限制最大宽度
    // max-width: 750px;

    margin: 0 auto;
    
    background-color: #f2f2f2;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
}

// ----------------------------通用样式、特殊样式
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    text-decoration: none;
}

div {
    box-sizing: border-box;
}

// ----------------------------顶部搜索栏
// 元素rem = 元素px / 设计稿字体大小50px
@baseSize: 50;

.search-box {
    display: flex;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 15rem;
    // 用rem单位
    height: (88rem / @baseSize);
    background-color: #ffc001;
    .classify {
        width: (44rem / @baseSize);
        height: (70rem / @baseSize);
        margin: (11rem / @baseSize) (25rem / @baseSize) (7rem / @baseSize) (24rem / @baseSize);
        background: url(../images/classify.png) no-repeat;
        background-size: (44rem / @baseSize) (70rem / @baseSize);
    }
    .search {
        flex: 1;
        input {
            width: 100%;
            height: (66rem / @baseSize);
            margin-top: (12rem / @baseSize);
            padding-left: (55rem / @baseSize);
            border: 0;
            background-color: #fff2cc;
            color: #757575;
            font-size: (25rem / @baseSize);
            border-radius: (33rem / @baseSize);
            outline: none;
        }
    }
    .login {
        width: (75rem / @baseSize);
        height: (70rem / @baseSize);
        margin: (10rem / @baseSize);
        color: #fff;
        font-size: (25rem / @baseSize);
        text-align: center;
        line-height: (70rem / @baseSize);
    }
}

// ----------------------------轮播图广告
.banner {
    width: (750rem / @baseSize);
    height: (368rem / @baseSize);
    img {
        width: 100%;
        height: 100%;
    }
}

// -----------------------------品牌栏广告
.ad {
    display: flex;
    a {
        flex: 1;
        img {
            width: 100%;
        }
    }
}

// ------------------------------导航栏
nav {
    width: (750rem / @baseSize);
    a {
        float: left;
        width: (150rem / @baseSize);
        height: (140rem / @baseSize);
        text-align: center;
        img {
            display: block;
            width: (82rem / @baseSize);
            height: (82rem / @baseSize);
            margin: (10rem / @baseSize) auto 0;
        }
        span {
            color: #333;
            font-size: (25rem / @baseSize);
        }
    }
}